import axios from '../config.js'

export function getOrderList(status, page) {
    const url = 'mobile/order/list'
    const data = {
        status: status,
        page: page,
    }
    return axios.get(url, { params: data })
}

export function getOrderInfo(id) {
    const url = 'mobile/order/detail'
    const data = {
        id: id,
    }
    return axios.get(url, { params: data })
}

export function getOrderSummary() {
    const url = 'mobile/order/getSummary'
    const data = {}
    return axios.get(url, { params: data })
}

export function getVerification(code) {
    const url = 'mobile/Order/sendPayNote'
    const data = {
        type: 3,
        code: code
    }
    return axios.post(url, data)
}
//取消订单
export function cancelOrder(orderId) {
    const url = 'mobile/Order/cancelOrder'
    const data = {
        orderId: orderId
    }
    return axios.post(url, data)
}